home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacApp Release 10 / MacApp Release 10 - HD Ready / Libraries / App / Includes / UVUAssist.h < prev   
Encoding:
Text File  |  1996-04-03  |  18.1 KB  |  581 lines  |  [TEXT/MPS ]

  1. //    File:        UVUAssist.h - MacApp 3.1 compatible version
  2. //
  3. //    Contains:    C++ header file for the V.U. Assistance Hook for MacApp applications
  4. //
  5. //    Written by:    Jim Schneider and Jeroen Schalk
  6. //
  7. //    Copyright © 1991-96 by Apple Computer, Inc. All rights reserved.
  8. //
  9. //  Version: 2.0d1
  10.  
  11. #ifndef __UVUASSIST__
  12. #define __UVUASSIST__
  13.  
  14. #if qNeedsVU
  15.  
  16. // MacApp
  17.  
  18. #ifndef __UEVENTHANDLER__
  19. #include "UEventHandler.h"
  20. #endif
  21.  
  22. #ifndef __UGEOMETRY__
  23. #include "UGeometry.h"
  24. #endif
  25.  
  26. #ifndef __UOBJECT__
  27. #include "UObject.h"
  28. #endif
  29.  
  30. // Toolbox
  31.  
  32. #ifndef __MENUS__
  33. #include <Menus.h>
  34. #endif
  35.  
  36. #ifndef __WINDOWS__
  37. #include <Windows.h>
  38. #endif
  39.  
  40.  
  41. class TControl;
  42. class TCtlMgr;
  43. class TGridView;
  44. class TPopup;
  45. class TView;
  46.  
  47. /* ================================================================== */
  48. /* Constant definitions */
  49.  
  50. /* 
  51. |    This is the idle frequency of VUAssist.  By default this
  52. |    is set to give VUAssist a very high idle frequency.  Even
  53. |    though VUAssist does nothing with this idle time, this 
  54. |    ensures that SystemTask will be called frequently while
  55. |    the context of the application is the current context.  In
  56. |    short, this enables Agent VU, which operates at SystemTask
  57. |    while the app's context is current, to operate at maximum
  58. |    efficiency.  This maximizes V.U. performance.  If, for some
  59. |    reason, you would like to let the app. sleep for longer
  60. |    periods of time, you can increase this value or, better yet,
  61. |    call gVUAssist.SetIdleFreq with the new frequency.  Note,
  62. |    however, that this will cause V.U. to run more slowly against 
  63. |    the application.
  64. */
  65. const long kVUAssistIdleFreq = 1;
  66.  
  67.  
  68. enum MoleError {
  69.     mNoErr,                    /* 0 */
  70.     mUnknownSelector,
  71.     mAlreadyOnline,
  72.     mDeferredKilled,
  73.     mOtherVUHost,
  74.     mBadAddress,            /* 5 */
  75.     mBadHandle,
  76.     mBadBlockSize,
  77.     mNoKbdDrvr,
  78.     mBigFail,
  79.     mBadTarget,                /* 10 */
  80.     mNoCall,
  81.     mNoPendingTask,
  82.     mAppNotFound,
  83.     mNoAppInfo,
  84.     mDriverDeferred,        /* 15 */
  85.     mBadDItemIndex,
  86.     mBadItemHdl,
  87.     mCursBusy,
  88.     mBadMenuRank,
  89.     mBadMenuID,                /* 20 */
  90.     mBadMenuItemIndex,
  91.     mBadLastMenuItemIndex,
  92.     mHandleTooBig,
  93.     mNoCmdToAbort,
  94.     mRelRespFail,            /* 25 */
  95.     mNotSupportedOnThisMac,            /* new in 2.0... */
  96.     mCantFindApp,
  97.     mCantLaunchApp,
  98.     mLaunchAppErr,
  99.     mEndErr                    /* 30 */
  100. };
  101.  
  102.  
  103. /* ----------------- VUAssist proc data structures -------------------- */
  104. /* The following data structures and constants are not used by the mole. They're
  105. defined for the benefit of the MacApp VUAssist routine. */
  106.  
  107. enum ViewItems {
  108.     VINotMember,        /* not a control or dialog item */
  109.     VIButton,            /* TButton - this is the first control */
  110.     VIRadio,            /* TRadio */
  111.     VICheckBox,            /* TCheckBox */
  112.     VIScrollBar,        /* TScrollBar or TSScrollBar - this is the last control */
  113.     VIPopup,            /* TPopup */
  114.     VIStatText,            /* TStaticText - from here on are dialog items only */
  115.     VIEditText,            /* TEditText or TNumberText */
  116.     VIIcon,                /* TIcon */
  117.     VIPicture,            /* TPicture */
  118.     VITextEdit,            /* TTEView or TDialogTEView */
  119.     VIGridItem            /* cell of a TGridView */
  120. };
  121.  
  122. /* ================================================================== */
  123.   
  124. /* ----------------- General Mole data structures -------------------- */
  125. /* The following data structures are used by Agent VU(the Mole). */
  126.   
  127. /* 
  128. |    Selectors for the currently implemented mole routines:
  129. |    At least one 'mole assist' routine has come to depend on these selector values.
  130. |    Therefore, we should make an effort not to change established values when adding new ones.
  131. |    So new UPPER MOLE commands go to the end of the list (right before EmptyDeferred),
  132. |    and new LOWER MOLE commands go before the beginning of the list, as negative numbers.
  133. */
  134. enum MoleSelectors { 
  135. /* Lower mole commands: */
  136.     EntMultKeys        = -3,    /* new in 2.0 */
  137.     SGestalt        = -2,    /* new in 2.0 */
  138.     AbortPending     = -1,
  139.     SStatus            = 0, 
  140.     GoOff, 
  141.     ComeOn, 
  142.     SBlock, 
  143.     PBlock,         /* not currently used by VU */
  144.     SBlkSize,        /* not currently used by VU  5 */
  145.     SMouse,
  146.     PMouse,
  147.     EntKey,            /* 8 */
  148. /* Upper mole commands: */
  149.     SMenuInfo,        /* 9 */
  150.     SMenuItems,        /* 10 */
  151.     SetMItemKey,    /* not currently implemented or used */
  152.     SFrontWind,
  153.     SFindWind,
  154.     SWindInfo,
  155.     SFindCtl,        /* 15 */
  156.     SCtlInfo,
  157.     SFindDItem,
  158.     SDItemInfo,
  159.     SResPeek,
  160.     SyncSBlock,        /* 20 */
  161.     SNextEvent,
  162.     SHBlock,
  163.     PMouseString,
  164.     SIconHeight,
  165.     SScriptInfo,    /* 25 */
  166.     SCurrKCHRid,
  167.     LaunchApp,        /* new in 2.0 */
  168.     SScrnInfo,        /* new in 2.0 */
  169.     SResPiece,        /* new in 2.0 */
  170.     EmptyDeferred,    /* 30 */
  171.     EndSelect
  172. };
  173.  
  174. /* ----------------- Menu related data structures -------------------- */
  175.  
  176. #if defined(powerc) || defined (__powerc)
  177. #pragma options align=mac68k
  178. #endif
  179. struct SendMenuInfoParams {
  180.     short         menu_rank;    /* left-to-right rank in menu bar */
  181.     short         menu_ID;    /* ID of menu, if known */
  182.     MenuRef        menu_hdl;    /* MenuRef; handle to MenuInfo record, if known (for popups) */
  183.  
  184. };
  185. #if defined(powerc) || defined(__powerc)
  186. #pragma options align=reset
  187. #endif
  188.  
  189. typedef struct SendMenuInfoParams SendMenuInfoParams;
  190. typedef SendMenuInfoParams *SendMenuInfoParamsPtr;
  191.  
  192. #if defined(powerc) || defined (__powerc)
  193. #pragma options align=mac68k
  194. #endif
  195. struct MoleMenuInfo {
  196.     long num_items;            /* number of items in the menu */
  197.     long rank;                /* in menu bar, left to right */
  198.     long left_edge;            /* as extracted from the menu list field */
  199.     short menuID;            /* menu ID as known to the menu manager */
  200.     short menuWidth;        /* assuming a rectangular menu, the width in pixels
  201.                             NOT the position on the screen! */
  202.     short menuHeight;        /* assuming a rectangular menu, the height in pixels
  203.                             NOT the position on the screen! */
  204.     long enableFlags;        /* Least significant bit is one if the menu iteself is 
  205.                             enabled.  Other bits describe the enabled state of 
  206.                             the first 31 items */
  207.     /*
  208.     |    The menu field either has a pointer to the menu title as a pascal string,
  209.     |    or the text of the menu title extending off into the buffer 
  210.     */
  211.     union {
  212.         unsigned char *Data;
  213.         unsigned char text[1];
  214.     } menuTitle;
  215. }; 
  216. #if defined(powerc) || defined(__powerc)
  217. #pragma options align=reset
  218. #endif
  219.  
  220. typedef struct MoleMenuInfo MoleMenuInfo;
  221. typedef MoleMenuInfo *MoleMenuInfoPtr;
  222.  
  223. #if defined(powerc) || defined (__powerc)
  224. #pragma options align=mac68k
  225. #endif
  226. struct SendMenuItemsParams {
  227.     short         menu_rank;        /* left-to-right rank in menu bar */
  228.     short         menu_ID;        /* ID of menu, if known */
  229.     short         start_item;        /* rank of item in menu to start the block with */
  230.     short         stop_item;        /* rank of last item in the menu we are interested in */
  231.     MenuRef        menu_hdl;        /* handle to MenuInfo record, if known (for popups) */
  232. };
  233. #if defined(powerc) || defined(__powerc)
  234. #pragma options align=reset
  235. #endif
  236.  
  237. typedef struct SendMenuItemsParams SendMenuItemsParams;
  238. typedef SendMenuItemsParams *SendMenuItemsParamsPtr;
  239.  
  240.  
  241.  
  242. /* ----------------- Window related data structures -------------------- */
  243.  
  244. /* 
  245. |    Used in the valid flags field. The valid flags field reflects which of the traits ( fields ) the Mole was able
  246. |    to fill in accurately. 
  247. */
  248. #define VKIND                 0
  249. #define VWRECT                 1
  250. #define VRANK                 2
  251. #define VFLAGS                 3
  252. #define VVARIANT             4
  253. #define VCTLCOUNT             5
  254. #define VTITLE                 6
  255. #define VALERTP             7
  256. #define VITEMCNT             8
  257. #define VITEMLIST             9
  258. #define VPART                 10
  259. #define VKIND_MASK             0x0001
  260. #define VRECT_MASK             0x0002
  261. #define VRANK_MASK             0x0004
  262. #define VFLAGS_MASK         0x0008
  263. #define VVARIANT_MASK         0x0010
  264. #define VCTLCNT_MASK         0x0020
  265. #define VTITLE_MASK         0x0040
  266. #define VITEMCNT_MASK         0x0080
  267. #define VPART_MASK             0x0100
  268. #define VALL_W_MASK         0x007F
  269. #define VALL_D_MASK         0x00FF
  270. #define MWD_TITLE_LEN         64
  271. #define UNSPECIFIED_RANK    (-1)
  272.  
  273. typedef Point SendFindWindowParam;    /* point to test, in global coords */
  274. typedef SendFindWindowParam *SendFindWindowParamPtr;
  275.  
  276. typedef short *DWindReqPtr;
  277.  
  278. /* This is the format of the output buffer for SWindInfo calls. */
  279. #if defined(powerc) || defined (__powerc)
  280. #pragma options align=mac68k
  281. #endif
  282. struct MoleWindowDescriptor {
  283.     short validFlags;        /* which of the following have valid data */
  284.     short windowKind;        /* as in window record - standard, dialog, system, alert */
  285.     Rect portRect;            /* as in window's grafport */
  286.     Rect structRect;        /* boundary rect of struct rgn - global coords */
  287.     Rect contentRect;        /* boundary rect of content region - global coords */
  288.     short windowPart;        /* returned by some calls */
  289.     short windowRank;        /* rank in window list, 1->N */
  290.     short windowFlags;        /* visible, hilited, go-Away, spare */
  291.     short windowVariant;    /* variation code extracted from high byte of window defproc handle */
  292.     short controlCount;        /* how many controls in the control list */
  293.     short numItems;            /* number of items in item list */
  294.     /*  
  295.     |    The title field either has a pointer to the window title as a pascal string,
  296.     |    or the text of the window title extending off into the buffer 
  297.     */
  298.     union {                                
  299.         unsigned char    *text_ptr;
  300.         unsigned char    text[256];
  301.     } windowTitle;
  302. };
  303. #if defined(powerc) || defined(__powerc)
  304. #pragma options align=reset
  305. #endif
  306.  
  307. typedef struct MoleWindowDescriptor MoleWindowDescriptor;
  308. typedef MoleWindowDescriptor *MoleWDescPtr;
  309.  
  310.  
  311. /* ----------------- Control related data structures -------------------- */
  312.  
  313. #define VCWINDOW             0
  314. #define VCRECT                 1
  315. #define VCVALUE             2
  316. #define VCMIN                 3
  317. #define VCMAX                 4
  318. #define VCHILITE            5
  319. #define VCPART                 6
  320. #define VCRANK                 7
  321. #define VCTITLE             8
  322. #define VCWINDOWRANK_MASK    0x0001
  323. #define VCRECT_MASK            0x0002
  324. #define VCVALUE_MASK        0x0004
  325. #define VCMIN_MASK            0x0008
  326. #define VCMAX_MASK            0x0010
  327. #define VCHILITE_MASK        0x0020
  328. #define VCPART_MASK            0x0040
  329. #define VCRANK_MASK            0x0080
  330. #define VCVARIANT_MASK        0x0100
  331. #define VCTITLE_MASK        0x0200
  332. #define VALL_C_MASK            0x03FF
  333.  
  334. /* standard CDEF IDs */
  335. #define POPUP_CDEF 63
  336.  
  337. typedef Point SendFindControlParam;    /* point to test, in global coords */
  338. typedef SendFindControlParam *SendFindControlParamPtr;
  339.  
  340. /* This is the format of the input buffer for SCtlInfo calls. */
  341. #if defined(powerc) || defined (__powerc)
  342. #pragma options align=mac68k
  343. #endif
  344. struct SendControlInfoParams { 
  345.     short control_rank;        /* rank in control list */
  346.     short window_rank;        /* rank of owning window amongst visible windows */
  347. };
  348. #if defined(powerc) || defined(__powerc)
  349. #pragma options align=reset
  350. #endif
  351.  
  352. typedef struct SendControlInfoParams SendControlInfoParams;
  353. typedef SendControlInfoParams *SendCtlInfoParamsPtr;
  354.  
  355. /* This is the format of the output buffer for SCtlInfo calls. */
  356. #if defined(powerc) || defined (__powerc)
  357. #pragma options align=mac68k
  358. #endif
  359. struct MoleControlDescriptor {            /* mole control descriptor */
  360.     short validFlags;        /* which of the following have valid data */
  361.     short owner_rank;        /* rank of owning window amongst visible windows */
  362.     Rect ctlRect;            /* The ctl fileds are copied from the */
  363.     short ctlValue;            /*  control record */
  364.     short ctlMin;
  365.     short ctlMax;
  366.     short ctlHilite;
  367.     short part;                /* filled in on some calls */
  368.     short ctlRank;            /* rank in owning window's control List */
  369.     short ctlDefID;            /* variation code from def proc handle */
  370.     /* 
  371.     |     The ctlData field will have different info depending on the ctlDefID.
  372.     |      (For backward compatibility, it can't exceed 'short' in length, or else subsequent
  373.     |   field offsets change.) 
  374.     */
  375.     union {
  376.         short                popupMenuID;        /* resource ID of popup menu */
  377.     } ctlData;    
  378.     /* 
  379.     |    The title field either has a pointer to the control title as a pascal string,
  380.     |    or the text of the control title extending off into the buffer
  381.     */
  382.     union {
  383.         unsigned char         *text_ptr;
  384.         unsigned char        text[256];
  385.     } ctlTitle;
  386.     /* 
  387.     |    New field for version 2.0. This field is only valid in Virtual User to the
  388.     |    caller of Mole_Transceiver.  During ATP response, the menu handle is glued
  389.     |    onto the end (yecch) of the control title string. 
  390.     */
  391.     MenuRef                    popupMenuRef;    /* valid if there's a popup menu */
  392. };
  393. #if defined(powerc) || defined(__powerc)
  394. #pragma options align=reset
  395. #endif
  396.  
  397. typedef struct MoleControlDescriptor MoleControlDescriptor;
  398. typedef MoleControlDescriptor *MoleCDescPtr;
  399.  
  400.  
  401. /* ----------------- Dialog related data structures -------------------- */
  402.  
  403. #define btnCtrlItem 4
  404. #define chkCtrlItem 5
  405. #define radCtrlItem 6
  406. #define resCtrlItem 7
  407.  
  408. #define RANK_OF_THE_INVISIBLE    (-2)
  409. /* special constant for items which do no fit into any of the other content item categories */
  410. #define CUSTOM_ITEM              (-1)        
  411.  
  412. #if defined(powerc) || defined (__powerc)
  413. #pragma options align=mac68k
  414. #endif
  415. struct SendDItemInfoParams { 
  416.     short item_num;            /* index in dialogs item list */
  417.     short window_rank;        /* rank of owning window amongst visible windows */
  418. };
  419. #if defined(powerc) || defined(__powerc)
  420. #pragma options align=reset
  421. #endif
  422.  
  423. typedef struct SendDItemInfoParams SendDItemInfoParams;
  424. typedef SendDItemInfoParams *SendDItemInfoPtr;
  425.  
  426. #if defined(powerc) || defined (__powerc)
  427. #pragma options align=mac68k
  428. #endif
  429. struct MoleDItemInfo {              /* mole dialog item info */
  430.     Rect        box;                /* item bounding box */
  431.     long        ctlRank;             /* if a control - then the control's rank in the control list */
  432.     SignedByte    itemType;            /* item type */
  433.     Boolean        item_enabled;
  434.     Boolean        has_text;
  435.     short        owner_rank;
  436.     short        item_num;
  437.     /* The itemData field either has a pointer to the control title as a pascal string,
  438.        or the text of the control itemData extending off into the buffer, OR the
  439.        short short which is the resource ID of the icon or picture assocaited with
  440.        the item. */
  441.     union {
  442.         unsigned char    text[256];            /* static, edit, or control title text */
  443.         unsigned char    *item_text_ptr;
  444.         short            itemResID;
  445.     } itemData;
  446. }; 
  447. #if defined(powerc) || defined(__powerc)
  448. #pragma options align=reset
  449. #endif
  450.  
  451. typedef struct MoleDItemInfo MoleDItemInfo;
  452. typedef MoleDItemInfo *MoleDItemInfoPtr;
  453.  
  454.  
  455. /* ----------------- Mole data block structures -------------------- */
  456.  
  457. #define MOLE_DATA_BLOCKSIZE 512         /* a nice, arbitrary, round number */
  458. #define ADDITIONAL_MENU_ITEM_DATA 5     /* bytes in a menu item subrec in addition to 
  459.                                         the text of the menu item (dont ask, its ugly) */
  460. #if defined(powerc) || defined (__powerc)
  461. #pragma options align=mac68k
  462. #endif
  463. struct MoleDataBlock {
  464.     short    blockLength;    /* blockLength */
  465.     Byte    dataBlock[MOLE_DATA_BLOCKSIZE];
  466.     /* the returned packet will only be a long as needed to send the requested data */
  467. };
  468. #if defined(powerc) || defined(__powerc)
  469. #pragma options align=reset
  470. #endif
  471.  
  472. typedef struct MoleDataBlock MoleDataBlock;
  473. typedef MoleDataBlock *MoleDataBlockPtr;
  474.  
  475.  
  476. /* ----------------- VUAssist classes -------------------- */
  477.  
  478. class TGridItem : public TObject
  479. {
  480.     MA_DECLARE_CLASS;
  481.     
  482. public:
  483.     TGridView *fGridView;    /* reference to a TGridView object */
  484.     long fColumn;            /* 1 based counter */
  485.     long fRow;                /* 1 based counter */
  486.     long fRank;                /* (row-1) * rowlength + column */
  487.  
  488.     virtual ~TGridItem();
  489.         // Destructor
  490.  
  491.     virtual void IGridItem(TGridView *theGridView, short rank);
  492.     virtual void GetExtent(VRect& itsExtent);
  493.     virtual void LocalToWindow(VPoint *thePoint);
  494. };
  495.  
  496. typedef long (*MoleHookProcPtr)(long select, Ptr input, Ptr output, short *outputSize, long Result);
  497.  
  498. enum
  499. {
  500.     uppMoleHookProcInfo = kCStackBased
  501.         | RESULT_SIZE(SIZE_CODE(sizeof(long)))
  502.         | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  503.         | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Ptr)))
  504.         | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Ptr)))
  505.         | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(short *)))
  506.         | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(long)))
  507. };
  508.  
  509. #if USESROUTINEDESCRIPTORS
  510. typedef UniversalProcPtr MoleHookUPP;
  511.  
  512. #define CallMoleHookProc(userRoutine, varCode, theWindow, message, param)        \
  513.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppMoleHookProcInfo, (varCode), (theWindow), (message), (param))
  514. #define NewMoleHookProc(userRoutine)    \
  515.         (MoleHookUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppMoleHookProcInfo, GetCurrentArchitecture())
  516. #else
  517. typedef MoleHookProcPtr MoleHookUPP;
  518.  
  519. #define CallMoleHookProc(userRoutine, varCode, theWindow, message, param)        \
  520.         (*(userRoutine))((varCode), (theWindow), (message), (param))
  521. #define NewMoleHookProc(userRoutine)    \
  522.         ((MoleHookUPP) (userRoutine))
  523. #endif
  524.         
  525. class TVUAssist : public TEventHandler
  526. {
  527.     MA_DECLARE_CLASS;
  528.  
  529. public:
  530.     short fMoleRefNum;
  531.     Boolean fGridItemSupport;
  532.  
  533.     virtual ~TVUAssist();
  534.         // Destructor
  535.  
  536.     virtual void IVUAssist(Boolean gridItemSupport);
  537.     virtual void OpenMoleDriver();
  538.     virtual void SuspendMole();
  539.     virtual void ResumeMole();
  540.     virtual void SetDebuggerHook(MoleHookUPP newHook);
  541.     virtual MoleError MoleAssist(long select, Ptr input, Ptr output, short *outputSize, long intResult);
  542.  
  543.     virtual MoleError DoMenuItems(Ptr input, Ptr output, short *outputSize, MoleError Result);
  544.     virtual MoleError DoMenuInfo(Ptr input, Ptr output, short *outputSize, MoleError Result);
  545.     virtual MoleError DoSendWindowInfo(Ptr input, Ptr output, short *outputSize, MoleError Result);
  546.     virtual MoleError DoFindControl(Ptr input, Ptr output, short *outputSize, MoleError Result);
  547.     virtual MoleError DoSendControlInfo(Ptr input, Ptr output, short *outputSize, MoleError Result);
  548.     virtual MoleError DoSendDlogItemInfo(Ptr input, Ptr output, short *outputSize, MoleError Result);
  549.     virtual void FillPopupDesc(MenuRef theMenuHdl, short menuRank, MoleMenuInfoPtr menuDescPtr, short *outputSize);
  550.     virtual MoleError FillPopupItemDesc(MenuRef theMenuHdl, short start, short stop,
  551.                                         MoleDataBlockPtr menuItemDescPtr, short *outputSize);
  552.     virtual Boolean FillCtrlDesc(MoleCDescPtr CtrlDescPtr, short thePart, short windowRank,
  553.                                         short ControlRank, TControl *theControl, short *outputSize);
  554.     virtual void ViewRectToWindowRect(Rect *aRect, TView *aView);
  555.     virtual void FillDlogItemDesc(MoleDItemInfoPtr dlogDescPtr, TWindow *window,
  556.                                          short windowRank, short itemRank, TView *Item,
  557.                                          short *outputSize, TGridItem *gridItem);
  558.     virtual TWindow *RankToWindow(short rank);
  559.     virtual short WindowToRank(WindowRef WindToFind);
  560.     virtual void GlobalToWindow(TWindow *window, Point Pt, VPoint *VPt);
  561.     virtual void WindowToView(TView *view, VPoint *VPt, Point *Pt);
  562.     virtual TPopup *MenuIDToPopup(short menuID);
  563.     virtual TCtlMgr *PointToControl(TWindow *window, Point Pt, short *rank);
  564.     virtual short ViewCount(TWindow *window, Boolean dlogViewItems);
  565.     virtual short ItemToRank(TWindow *window, TView *view, Boolean dlogViewItems);
  566.     virtual TView *RankToItem(TWindow *window, short rank, Boolean dlogViewItems,
  567.                                      TGridItem*& gridItem);
  568.     virtual short CountGridItems(TGridView *theGridView);
  569.     virtual ViewItems GetItemType(TView *Item, Boolean dlogViewItems, Boolean gridViewItems);
  570.     
  571. };
  572.  
  573. /* ================================================================== */
  574. /* Variable declarations */
  575.  
  576. extern TVUAssist *gVUAssist;
  577.  
  578. #endif // of #if qNeedsVU
  579.  
  580. #endif // of #ifndef __UVUASSIST__
  581.